Stairs
Stairs are a common block in Minecraft that allow for easy movement over raised terrain. Custom Stuff has the capability of adding new stairs as a Block. Stairs can have most of the same attributes as normal blocks, and for the most part can be coded in the same way. Stairs cannot utilize metadata values to create variants because the metadata of stair blocks is instead used to track their orientation. Custom Stuff will give an error when you use metadata values, so you cannot, for example, make the stairs texture chang depending on its facing. Required Attributes * displayName * id * name * textureFileXN * textureFileXP * textureFileYN * textureFileYP * textureFileZN * textureFileZP Optional Attributes * addToCreative * canSilkHarvest * creativeTab * drop * fireSpreadSpeed * flammability * fortuneModifier * hardness * harvestLevel * hasCollision * hasTileEntity * isBeaconBase * isBurning * isFireSource * isWood * light * material * opacity * pick * resistance * semiTransparent * slipperiness * stepSound * tickrate * tileEntity * tileTransparent * toolClass * transparent textureFile and textureIndex In CS2 versions for 1.4.7 and below, CS2 0.9.9 or below, textureFile was used to specify the texture sheet and textureIndex was used for identifying the specific icon within the texture sheet. If using CS2 0.9.9 or lower, make sure to use both of these attributes. Older Examples and Information for Custom Stuff 1. Stairs cannot use Damage Values to create variants because the metadata of stair blocks are instead used to track the direction they're facing. Example Stairs Block name="Snow Stairs"; id=226; texturefile="terrain.png"; textureindex=66; type="stairs"; material="ground"; stepsound="grass"; hardness=0.1; resistance=1; iddropped=226; opacity=0; toolclass="shovel"; harvestlevel=0; Stairs Block Attributes Below is a table of attributes available to stairs-type blocks, including information on notable attributes. Required Attributes * name * id * type * texturefile * textureindex * opacity * toolclass * harvestlevel Optional Attributes * material * stepsound * hardness * resistance * light * iddropped * quantitydropped * damagedropped * transparent * collision * speed * gravity * movebypiston * addtocreative * color * container * maxstack type This must be set to 'stairs' in order for the block to function as stairs. opacity Setting this attribute to a low value prevents a rather pronounced visual bug. See Importance of the Opacity Attribute below. Importance of the Opacity Attribute When making stair blocks the opacity attribute should always be set to a value of ten or less even if the the material being used not being intrinsically translucent. This is done to prevent a visual 'bug', demonstrated by the picture at right, which causes a shadow on the inner angle of the block regardless of light level. This 'glitch' occurs because Minecraft calculates the light level of the area 'inside' the block based on what's immediately below it. Because a block normally blocks all light, the boundary of the stairs block (the box you see when you place your reticule on it) forces the game to calculate the light level as being 0 on the ground beneath the block. Setting the opacity to a low value fixes this issue. This is also why stairs, slabs, and doors in the vanilla game don't block light entirely even when they logically should. Category:Examples Category:Block Types Category:Examples (CS1) Category:Custom Stuff 2 Category:Examples (CS2)